/**
 * Created with IntelliJ IDEA.
 * User: wangyanginfo
 * Date: 12-8-29
 * Time: 上午11:11
 * To change this template use File | Settings | File Templates.
 */
function addTab(subtitle,url){
    if(!$('#div-tabs').tabs('exists',subtitle)){
        $('#div-tabs').tabs('add',{
            title:subtitle,
            content:createFrame(url),
            closable:true
        });
    }else{
        $('#div-tabs').tabs('select',subtitle);
    }
}

function createFrame(url){
    var iframe_obj = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
    return iframe_obj;
}